﻿@using Domain.Dto.Selectors
@using Domain.Model
@model SelectorResponseDto

<div class="row">
    <table class="table table-bordered">
        <thead>
            <tr>
                <th scope="col">ID</th>
                <th scope="col">Selector</th>
                <th scope="col">type</th>
                <th scope="col">Multiple</th>
                <th scope="col">Parent selectors</th>
                <th scope="col">Actions</th>
            </tr>
        </thead>
        <tbody>
            @foreach (var it in Model.Childrens ?? Enumerable.Empty<Selector>())
            {
                <tr>
                    <td>@it.Name</td>
                    <td>@it.Selector</td>
                    <td>@it.Type</td>
                    <td>@it.Multiple</td>
                    <td>@it.ParentSelectorNames</td>
                    <td>
                        <a class="btn-primary btn" asp-action="Detail" asp-route-siteMapId=@it.SiteMapId asp-route-Id=@it.Id>Detail</a>
                        <a class="btn-primary btn" asp-action="Edit" asp-route-Id="@it.Id">Edit</a>
                        <a class="btn-danger btn" asp-action="Delete" asp-route-Id=@it.Id>Delete</a>
                    </td>
                </tr>
            }
        </tbody>
    </table>
</div>
<div>
    <a asp-action="Add" asp-route-Id="@Model.Selector.Id"></a>
</div>